﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//
using System.ComponentModel.DataAnnotations;


namespace SoftKeyLib
{
    /// <summary>
    /// 加密锁错误代码表
    /// </summary>
    public enum SoftKeyErrorEnum
    {
        /// <summary>
        /// 加密锁正常就绪！
        /// <para>表示加密锁密码正确且有数据写入到锁中，但需进一步验证写入数据的正确性。</para>
        /// </summary>
        [Display(Description = "加密锁正常就绪！")]
        SoftKeyIsOK = 0,

        /// <summary>
        /// 该加密锁是新锁，请先绑定加密锁！
        /// <para>存入的值为 null 或空格串，并非 MD5 值！</para>
        /// </summary>
        [Display(Description="该加密锁是新锁，请先绑定加密锁！")]
        BindingNewSoftKey = -1,

        /// <summary>
        /// 请先绑定加密锁！
        /// <para>没有获取到加密锁里的 MD5 值！锁可能异常。</para>
        /// </summary>
        [Display(Description = "请先绑定加密锁或者更换新的加密锁！")]
        BindingSoftKeyFirst = -2,

        /// <summary>
        /// 加密锁密码不正确，请与管理员联系！
        /// <para>写密码、读密码、算法密码不正确！</para>
        /// </summary>
        [Display(Description = "加密锁密码不正确，请与管理员联系！")]
        WrongPasswordInSoftKey = -3,

        /// <summary>
        /// 加密锁数据不正确，可能该加密锁已被绑定，请重置加密锁！
        /// <para>写密码、读密码、算法密码不正确、并非储存器默认值！</para>
        /// </summary>
        [Display(Description = "加密锁数据不正确，可能该加密锁已被绑定，请重置加密锁！")]
        WrongDataInSoftKey = -4,

        /// <summary>
        /// 未找到加密锁！
        /// <para>未插入任何锁</para>
        /// </summary>
        [Display(Description = "未找到加密锁！")]
        CannotFindSoftKey = -5,

        /// <summary>
        /// 该加密锁与主机不匹配！
        /// <para>1. 另一台主机的旧锁，所有加密锁内数据正确，但本机未绑定任何加密锁。</para>
        /// <para>2. 另一台主机的旧锁。</para>
        /// <para>3. 该锁是已丢失的锁。</para>
        /// <para>4. MD5 值不匹配。</para>
        /// </summary>
        [Display(Description = "该加密锁与主机不匹配！")]
        CannotMatchSoftKey = -6,

        /// <summary>
        /// 该加密锁中存在数据，不能再次绑定！
        /// </summary>
        [Display(Description = "不能绑定旧锁！请重置加密锁！")]
        CannotBindingOldKey = -7,

        /// <summary>
        /// 数据库异常！
        /// </summary>
        [Display(Description = "数据库异常，请补办新锁！")]
        BuyNewSoftKey4OldKey1 = -8,

        /// <summary>
        /// 数据库异常或加密锁不匹配！
        /// </summary>
        [Display(Description = "数据库异常或加密锁不匹配，请补办新锁！")]
        BuyNewSoftKey4OldKey2 = -9,

        /// <summary>
        /// 数据库异常或加密锁不匹配(null)！
        /// </summary>
        [Display(Description = "数据库异常或加密锁不匹配，请补办新锁！")]
        BuyNewSoftKey4NewKey1 = -10,

        /// <summary>
        /// 数据库异常或加密锁不匹配！
        /// </summary>
        [Display(Description = "数据库异常或加密锁不匹配，请补办新锁！")]
        BuyNewSoftKey4NewKey2 = -11,



        /// <summary>
        /// 其它加密锁异常！
        /// </summary>
        [Display(Description = "其它异常情况！请重置加密锁！")]
        OtherException = -100,
    }
}
